cat docker-compose.yaml | grep image | awk -F ': ' '{gsub(/"/, "", $2); orig=$2; gsub(/[\/:]/, "-", $2); print orig, $2}' | while read orig_name new_name; do
  echo "导出镜像: $orig_name -> $new_name.tar.gz"
  docker save "$orig_name" | gzip -9 >"${new_name}.tar.gz"
done
